package com.norseman.demo.controller;

import com.norseman.demo.service.model.*;
import com.norseman.demo.service.model.*;

import java.sql.Timestamp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/restfulservice")
public class NextTargetLocationInfoController {

	@Autowired
	PassTargetService passTargetService;

	@RequestMapping(value = "/nexttargetinfo", method = RequestMethod.POST)
	@ResponseBody
	public TargetInfoPacket getNextTargetInfo(
			@RequestParam("athleteId") int athleteId) throws Exception {
		return passTargetService.getNextTargetInfo(athleteId);
	}

}
